package com.tencent.cloud.uikit.ui.widget;

import android.content.Context;
import android.support.v7.widget.SwitchCompat;
import android.util.AttributeSet;

import com.tencent.cloud.iov.util.ResourcesUtils;
import com.tencent.cloud.uikit.R;

/**
 * @author showxiao
 * @date 2018/8/7
 */
public class IovSwitch extends SwitchCompat {

    public IovSwitch(Context context) {
        super(context);
        init();
    }

    public IovSwitch(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    public IovSwitch(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init();
    }

    private void init() {
        setThumbDrawable(ResourcesUtils.getDrawable(R.drawable.switch_btn_thumb));
        setTrackDrawable(ResourcesUtils.getDrawable(R.drawable.switch_btn_track));
    }
}
